package com.motong.gongdan.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.*;
import com.motong.gongdan.vo.system.otherVo.CustomFieldVo;
import com.motong.gongdan.vo.resp.MissionListResp;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author:fff
 * @time:2022/2/25
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@TableName("work_order")
public class WorkOrder extends PublicPo{
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String code;
    @TableField("product_id")
    private Integer productId;
    @TableField("start_time")
    private Date startTime;
    @TableField("end_time")
    private Date endTime;
    private Integer state;
    @TableField("planed_number")
    private BigDecimal planedNumber;
    @TableField("actual_number")
    private BigDecimal actualNumber;
    @TableField("good_product_number")
    private BigDecimal goodProductNumber;
    @TableField("bad_product_number")
    private BigDecimal badProductNumber;
    @TableField("reported_hours")
    private String reportedHours;
    @TableField("process_id")
    private String processId;
    @TableField("create_id")
    private Integer createId;
    @TableField("edit_id")
    private Integer editId;
    @TableField(updateStrategy = FieldStrategy.IGNORED, value = "actual_start_time")
    private Date actualStartTime;
    @TableField(updateStrategy = FieldStrategy.IGNORED, value = "actual_end_time")
    private Date actualEndTime;
    @TableField("create_time")
    private Date createTime;
    private String comment;
    private String qr;
    @TableField("client_name")
    private String clientName;
    @TableField(updateStrategy = FieldStrategy.IGNORED, value = "other")
    private String other;

    //是否加急
    @TableField("is_urgent")
    private Integer isUrgent;

    @TableField(exist = false)
    private String productCode;
    @TableField(exist = false)
    private String createName;
    @TableField(exist = false)
    private String editName;
    @TableField(exist = false)
    private Product product;
    @TableField(exist = false)
    private Integer isDelay;
    @TableField(exist = false)
    private List<MissionListResp> processesList;
    @TableField(exist = false)
    private JSONArray customFieldMess;
    //工单自定义字段
    @TableField(exist = false)
    private List<CustomFieldVo> customFieldVos;


}
